/**
 * File name : Timer.h
 * Location  : /Core/
 * Lib. name : Core
 * Designer  : RR (??-??-??)
 * Mod 1. by : OS (17-09-06)
 * Mod 2. by :
 */

#pragma once

#include "Thread.h"
#include "TimeSpan.h"

namespace Core
{
	class Timer : public Thread
	{
	protected:
		unsigned long m_Interval;//Milli Seconds
		TimeSpan m_TimeSpan;

		void Execute();
		void Start() {};

	public:
		virtual ~Timer();

		virtual void TryExecute();

		virtual void ExecuteByInterval() = 0;

		void Start(unsigned long p_Interval);

		unsigned long GetInterval();

		void SetInterval(unsigned long p_Interval);
	};
}
